package com.wt.controller.model.base;

import java.io.Serializable;

public class SuccessModel implements Serializable {

    private static final long serialVersionUID = 226979896114343793L;

    private boolean success = true;
    private String info = "操作成功";
    private Object result;

    public SuccessModel(String info,Object result) {
        this.info = info;
        this.result = result;
    }
    public SuccessModel(Object result) {
        this.result = result;
    }
    public SuccessModel(String info) {
        this.info = info;
    }
    public SuccessModel() {
    }

    public boolean isSuccess() {
        return success;
    }


    public String getInfo() {
        return info;
    }


    public Object getResult() {
        if(null == result) {
            return "";
        }
        return result;
    }
    @Override
    public String toString() {
        return "SuccessModel [success=" + success + ", info=" + info
                + ", result=" + result + "]";
    }

}
